package org.example.controller;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class CustomExceptionHandler {
    @ExceptionHandler(Exception.class)
    public HttpResult<Void> handleException(Exception e){
        System.out.println(e.getMessage());
        return HttpResult.internalError();
    }
}
